package com.justech.mes.v2.dao.repository;

import com.justech.mes.v2.model.MesV2EquipmentConfigureBasic;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

/**
 * @author lin.jia
 */
@Repository
public interface MesV2EquipmentConfigureBasicRepository extends JpaSpecificationExecutor<MesV2EquipmentConfigureBasic>, JpaRepository<MesV2EquipmentConfigureBasic, Long> {

    /**
     * 校验是重复
     *
     * @param machineName
     * @param dataType
     * @return
     */
    int countByMachineNameAndDataType(String machineName, String dataType);

    /**
     * 查询是否有机台信息
     *
     * @param machineName
     * @param dataType
     * @return
     */
    MesV2EquipmentConfigureBasic findByMachineNameAndDataType(String machineName, String dataType);

}
